import http from '@/api';
import { ADMIN_PREFIX_V2 } from '@/api/helper/prefix';

//获取供应商列表
export const getVendorList = params => {
  return http.get(ADMIN_PREFIX_V2 + `/basic_vendor/list`, params);
};

//保存供应商
export const createVendor = params => {
  return http.post(ADMIN_PREFIX_V2 + `/basic_vendor/create`, params);
};

//更新供应商
export const updateVendor = params => {
  return http.post(ADMIN_PREFIX_V2 + `/basic_vendor/update`, params);
};

//删除供应商
export const deleteVendors = params => {
  return http.post(ADMIN_PREFIX_V2 + `/basic_vendor/delete`, params);
};

//修改供应商状态
export const updateVendorState = params => {
  return http.post(ADMIN_PREFIX_V2 + `/basic_vendor/update-state`, params);
};
